#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
char* cp_array(char*a,int size)
{
	char* b = (char*)malloc(sizeof(char) * (size+1)); int j = 0;
	int i = 0;
	memset(b, 0, sizeof(char) * (size+1));
	
	for ( i = 0; i < size; i++)
	{
		if (a[i] != '*')
		{
			b[j] = a[i];
			j++;
		}
	}
	b[i] = '\0';
	for ( i = 0;i<=strlen(b); i++)
	{
		a[i] = b[i];
	}
	
	return a;
}
int main()
{
	char a[80] = { "*a*abdc**add**" };
	cp_array(a, strlen(a));
	printf("%s", a);
}